/*
 * This file is part of the Gwt-Generator project and was written by Henri Darmet for Objet Direct
 * <http://wwww.objetdirect.com>
 * 
 * Copyright © 2009 Objet Direct
 * 
 * Gwt-Generator is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * Gwt-Generator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along with Gwt-Generator. If not, see <http://www.gnu.org/licenses/>.
 */

package com.objetdirect.entities;

import com.objetdirect.engine.ClassDescriptor;

import junit.framework.TestCase;

public class TestJavaxPersistence extends TestCase {

	public void testJavaxPersistenceTypes() {
		ClassDescriptor owner = new ClassDescriptor("com.objetdirect.engine", "Client");
		assertEquals(JavaxPersistence.Entity.getUsageName(owner), "javax.persistence.Entity");
		assertEquals(JavaxPersistence.Id.getUsageName(owner), "javax.persistence.Id");
		assertEquals(JavaxPersistence.GeneratedValue.getUsageName(owner), "javax.persistence.GeneratedValue");
		assertEquals(JavaxPersistence.Version.getUsageName(owner), "javax.persistence.Version");
		assertEquals(JavaxPersistence.OneToOne.getUsageName(owner), "javax.persistence.OneToOne");
		assertEquals(JavaxPersistence.OneToMany.getUsageName(owner), "javax.persistence.OneToMany");
		assertEquals(JavaxPersistence.ManyToOne.getUsageName(owner), "javax.persistence.ManyToOne");
		assertEquals(JavaxPersistence.ManyToMany.getUsageName(owner), "javax.persistence.ManyToMany");
		assertEquals(JavaxPersistence.CascadeType.getUsageName(owner), "javax.persistence.CascadeType");
		assertEquals(JavaxPersistence.Transient.getUsageName(owner), "javax.persistence.Transient");
		assertEquals(JavaxPersistence.PreRemove.getUsageName(owner), "javax.persistence.PreRemove");
	}
	
}
